#!/usr/bin/env python
# -*- coding: utf-8 -*-
from os import listdir, getcwd
from os.path import realpath
from selenelang import defaults
lista = []
skiplist = ("list_().py","selenelang.py","linecount.py","pexpect.py","pxssh.py")
for i in listdir(getcwd()):
    if i[-3:]==".py" and i not in skiplist:
        line = 0
        file = open(realpath(i),"r")
        for j in file.readlines():
            line += 1
            if "_(\"" in j:
                lista.append((i,line,j[j.rfind("_(\"")+3:j[j.find("_(\"")+3:].rfind("\"")+j.find("_(\"")+3].strip()))
        file.close()
        
salida = ""

for x,y,z in lista:
    if not defaults.has_key(z):
        salida += x + " ( " + str(y) + " ) : " + z + "\n"

print salida
